package org.agpsoft.datareceiverinfrastructure.common;

/**
 * Class for encapsulating raw data
 * @author Ali Gokalp Peker
 */
public final class RawData {

	/**
	 * Holds raw data
	 */
	private byte[] data = null;
	
	/**
	 * Holds active data length,exists in "data" variable
	 */
	private int activeDataLength = 0;


	/**
	 * Constructor
	 */
	public RawData() {
		super();
	}

	/**
	 * Parameterized constructor
	 * @param data Data to set as buffer
	 */
	public RawData(byte[] data) {
		super();
		this.data = data;
	}
	
	/**
	 * Setter for data
	 * @param data data to set
	 */
	public void setData(byte[] data) {
		this.data = data;
	}

	/**
	 * Getter for data
	 * @return Data
	 */
	public byte[] getData() {
		return data;
	}

	/**
	 * Setter for active data length
	 * @param activeDataLength the activeDataLength to set
	 */
	public void setActiveDataLength(int activeDataLength) {
		this.activeDataLength = activeDataLength;
	}

	/**
	 * Getter for data length
	 * @return the activeDataLength
	 */
	public int getActiveDataLength() {
		return activeDataLength;
	}
}
